﻿<style>
    .content { border: 5px solid #808080; padding: 5px; }
    .Field { background-color: #333; color: #EEE; padding-right: 10px; width: 100px; display: block; float: left; height: 20px; overflow: hidden; }
    .record { background-color: #EEE; color: #808080; padding-right: 10px; width: 100px; display: block; float: left; height: 20px; overflow: hidden; }
    .recordBtn { background-color: #b7c5f3; clear: both; }
    .bs-example:after { content: "商品列表"; }
</style>
<script type="text/ecmascript">
    $(function () {
        $("#searchBtn").click(function () {
            $.ajax2({
                type: "GET",
                url: "/Home/Index",
                data: { name: $("#productName").val() },
                success: function (data) {
                    $("#list").html(data);
                }
            }, "#list");
        });
    });

</script>
@model List<DDD_AOP_WCF.Domain.DTO.ProductDTO>
<h2>@ViewBag.Title</h2>
<h3><a href="@Url.Action("Create")">WCF建立商品</a></h3>
<input type="text" id="productName" />&nbsp;&nbsp;<input type="button" value="查询" id="searchBtn" class="btn btn-default" />

@if (Model != null && Model.Any())
{   
    
    <div class="bs-example" id="list">
        @Html.Partial("List", Model)
    </div>
  
}
